import time


def check(func):
    def inner(*args, **kwargs):
        begin = time.time()
        rst = func(*args, **kwargs)
        end = time.time()
        print("函数运行了%s秒" % (end-begin))
        return  rst
    return inner


@check
def func1(name, n):
    print("函数开始/..")
    for i in range(n):
        print(f"{name}运行第{i+1}次")
        time.sleep(1)
    print("函数结束....")



func1("xxx",5)
